from typing import List

from models.chat_record import Role, ContentType
from models.workflow.inputModel import InputModel
from pydantic import BaseModel

class StateModel(BaseModel):

    userId: str
    role: str="user"
    currentReq: InputModel = None
    currentReqTex: str = None
    contentType: str="text"
    contentDes:str=""
    keyword: str=None
    shortMem: List[str] =[]
    hotMem: List[str] =[]
    longTimeMem: str=None
    memoryScene:List[str] = []
    res:str=None

    def to_dict(self):
        return {
        "userId": self.userId,
        "role": self.role,
        "currentReq": self.currentReq,
        "currentReqTex": self.currentReqTex,
        "contentType": self.contentType,
        "contentDes": self.contentDes,
        "keyword": self.keyword,
        "shortMem": self.shortMem,
        "hotMem": self.hotMem,
        "longTimeMem": self.longTimeMem,
        "memoryScene": self.memoryScene,
        "res": self.res
        }



